package com.example.hrsystem.data.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.util.Date;

/**
 * 任务项数据模型
 * 用于存储待办/待阅事项的信息
 */
@Entity(tableName = "tasks")
public class TaskItem {

    @PrimaryKey(autoGenerate = true)
    private int id;

    // 任务标题
    private String title;

    // 任务内容
    private String content;

    // 任务类型：待办、待阅
    private String taskType;

    // 任务状态：未开始、进行中、已完成
    private String status;

    // 优先级：低、中、高
    private String priority;

    // 创建时间
    private Date createTime;

    // 截止时间
    private Date deadline;

    // 完成时间
    private Date completionTime;

    // 任务创建者
    private String creatorId;

    // 任务接收者
    private String assigneeId;

    // 是否有附件
    private boolean hasAttachment;

    // 附件路径
    private String attachmentPath;

    // 备注信息
    private String remark;

    // 构造方法
    public TaskItem() {
        this.status = "未开始";
        this.priority = "中";
        this.createTime = new Date();
        this.hasAttachment = false;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getDeadline() {
        return deadline;
    }

    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    public Date getCompletionTime() {
        return completionTime;
    }

    public void setCompletionTime(Date completionTime) {
        this.completionTime = completionTime;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getAssigneeId() {
        return assigneeId;
    }

    public void setAssigneeId(String assigneeId) {
        this.assigneeId = assigneeId;
    }

    public boolean isHasAttachment() {
        return hasAttachment;
    }

    public void setHasAttachment(boolean hasAttachment) {
        this.hasAttachment = hasAttachment;
    }

    public String getAttachmentPath() {
        return attachmentPath;
    }

    public void setAttachmentPath(String attachmentPath) {
        this.attachmentPath = attachmentPath;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}